import App from './App'
import api from '@/utils/api/api.js'
// #ifndef VUE3
import Vue from 'vue'
import {baseUrl} from './utils/http.js'
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
Vue.component('mescroll-body',MescrollBody);
import tabBar from "@/components/tabs/tabbar.vue"
import store from '@/store/index'
Vue.component('tabBar',tabBar)
Vue.prototype.$API = api;
Vue.prototype.$baseUrl = baseUrl;
Vue.config.productionTip = false
App.mpType = 'app'
var QQMapWX = require('@/utils/qqmap-wx-jssdk.min.js');
var qqmapsdk = new QQMapWX({
	key: 'QMGBZ-V6V3X-SOK47-T2P6W-JT465-IHFMK'
});
Vue.prototype.qqmapsdk = qqmapsdk;

Vue.prototype.$timerManager = {
  timers: {},
  setTimer(name, interval, callback) {
    if (this.timers[name]) {
      clearInterval(this.timers[name]);
    }
    this.timers[name] = setInterval(callback, interval);
  },
  clearTimer(name) {
    if (this.timers[name]) {
      clearInterval(this.timers[name]);
      delete this.timers[name];
    }
  }
};


const app = new Vue({
	...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
